{# Load the tag library #}
{% load bootstrap4 %}
<!doctype html>
<html class="no-js" lang="">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>Downtime Database</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    {% bootstrap_css %}
  </head>
  <body>
    <nav class="navbar navbar-expand-lg navbar-light navbar-bg head">
      <div class="container ">
        {% if logo_url %}
        <span class=navbar-brand><img src={{ logo_url }} class="img-fluid"/></span>
        {% endif %}
        <span class="navbar-text" id="downtime-name">
          <h1>Downtime Database</h1>
        </span>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarOptions" aria-controls="navbarOptions" aria-expanded="false" aria-label="Toggle navigation">
          <span class="navbar-toggler-icon"></span>
        </button>
        <div class="navbar-collapse collapse" id="navbarOptions">
          <ul class="navbar-nav ml-auto">
            <li class="nav-item"><a class="nav-link" href="{% url 'downtime-list' %}">Downtime API</a></li>
          </ul>
        </div>
      </div>
    </nav>
    <div class="container">
        <div class="row">
            <div class="col-md-10 table-responsive">
            <table class="table table-striped table-bordered">
                <thead class="thead-dark">
                <tr>
                    <th>Start</th>
                    <th>End</th>
                    <th>Site</th>
                    <th>Enclosure</th>
                    <th>Telescope</th>
                    <th>Instrument Type</th>
                    <th>Reason</th>
                </tr>
                </thead>
                <tbody class="border-bottom">
                {% for downtime in object_list %}
                <tr class="table-default">
                    <td>{{ downtime.start }}</td>
                    <td>{{ downtime.end }}</td>
                    <td>{{ downtime.site }}</td>
                    <td>{{ downtime.enclosure }}</td>
                    <td>{{ downtime.telescope }}</td>
                    <td>{{ downtime.instrument_type }}</td>
                    <td>{{ downtime.reason }}</td>
                </tr>
                {% endfor %}
                </tbody>
            </table>
            </div>
            <div class="col-md-2">
                <form class="form" method="GET" action="{% url 'web-downtime-list' %}">
                {% bootstrap_form filter.form exclude="modified_after,modified_before,created_after,created_before" %}
                {% buttons submit="Filter" reset="Reset" %}{% endbuttons %}
                </form>
            </div>
        </div>
    </div>
  </body>
  {% bootstrap_javascript jquery='full' %}
</html>
